import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo:null,
    city:null,//当前的城市信息
    cityList:[],
  },
  mutations: {
    changeCityList(state,payload){
      state.cityList=payload
    },
    changeCity(state,payload){
      state.city=payload
    },
    chageUserInfo(state,payload) {
      state.userInfo=payload
      //挂载(混入到全局)到mixins里去
    }
  },
  actions: {},
  modules: {}
})
